﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeBudget
{
    public class OneTimeEarning : Earning, IOneTimeItem
    {
        public DateTime TimeStamp { get; set; }
        public OneTimeEarning(decimal amount, string name, Category category, DateTime timeStamp) : base(amount, name, category)
        {
            this.TimeStamp = timeStamp;
        }

        public override string ToString()
        {
            StringBuilder returnString = new StringBuilder(base.ToString());
            returnString.AppendFormat("-{0}-{1}", this.Category, this.TimeStamp.ToString("MM'/'dd'/'yyyy"));
            return returnString.ToString();
        }
    }
}
